tests: Run pull tests for bare/bare-user
authorColin Walters <walters@verbum.org>
Mon, 10 Jul 2017 01:46:23 +0000 (21:46 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 10 Jul 2017 14:18:18 +0000 (14:18 +0000)
We have variants of `test-basic` for all 4 modes, but not for pull-test, which
for some reason was named `pull-archive`, but mostly pulls *into* bare repos.
The test code was structured like the basic one where it called into a
`pull-test.sh`, so let's actually use it for 2/3 bare modes. (I tried to extend
it to `bare-user-only` but it failed, going to look at that after this).

This is related to https://github.com/ostreedev/ostree/issues/991

Closes: #998
Approved by: jlebon

Makefile-tests.am
tests/pull-test.sh
tests/test-pull-archive.sh [deleted file]
tests/test-pull-bare.sh [new file with mode: 0755]
tests/test-pull-bareuser.sh [new file with mode: 0755]

index b4ec44d65bd45aed8531c4c8ea3271be04843e9c..28e0a43a7a7480b3bfe715fc14ae7503324cac09 100644 (file)
@@ -67,7 +67,8 @@ _installed_or_uninstalled_test_scripts = \
        tests/test-help.sh \
        tests/test-libarchive.sh \
        tests/test-parent.sh \
-       tests/test-pull-archive.sh \
+       tests/test-pull-bare.sh \
+       tests/test-pull-bareuser.sh \
        tests/test-pull-commit-only.sh \
        tests/test-pull-depth.sh \
        tests/test-pull-mirror-summary.sh \
index aaba2a7bfa618c617efc3fa5b4e0c02cd9492acf..37b5e915909ab8af7a8de990bbfc51f7611a358f 100644 (file)
@@ -23,7 +23,7 @@ function repo_init() {
     cd ${test_tmpdir}
     rm repo -rf
     mkdir repo
-    ostree_repo_init repo
+    ostree_repo_init repo --mode=${repo_mode}
     ${CMD_PREFIX} ostree --repo=repo remote add origin $(cat httpd-address)/ostree/gnomerepo "$@"
 }
 
diff --git a/tests/test-pull-archive.sh b/tests/test-pull-archive.sh
deleted file mode 100755 (executable)
index d8b0f09..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/bash
-#
-# Copyright (C) 2011 Colin Walters <walters@verbum.org>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
-set -euo pipefail
-
-. $(dirname $0)/libtest.sh
-
-setup_fake_remote_repo1 "archive"
-
-. ${test_srcdir}/pull-test.sh
diff --git a/tests/test-pull-bare.sh b/tests/test-pull-bare.sh
new file mode 100755 (executable)
index 0000000..18afbe0
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Copyright (C) 2011 Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+set -euo pipefail
+
+. $(dirname $0)/libtest.sh
+
+setup_fake_remote_repo1 "archive"
+
+repo_mode=bare
+. ${test_srcdir}/pull-test.sh
diff --git a/tests/test-pull-bareuser.sh b/tests/test-pull-bareuser.sh
new file mode 100755 (executable)
index 0000000..0729247
--- /dev/null
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Copyright (C) 2011 Colin Walters <walters@verbum.org>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+set -euo pipefail
+
+. $(dirname $0)/libtest.sh
+
+setup_fake_remote_repo1 "archive"
+
+repo_mode=bare-user
+. ${test_srcdir}/pull-test.sh